﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Collections;
using System.Data.SqlClient;
using Media.Core.Models;

namespace Media.Core.Helpers.Main
{
    public class InsertDB
    {
        public static SubmissionCheck Insert(ArrayList SQLvariables, string StoredProc)
        {
            DataRow InsertData = Data.Connections.GetDataRow(StoredProc, SQLvariables);

            SubmissionCheck Submission = new SubmissionCheck
            {
                Message = InsertData["Message"].ToString(),
                Check = Convert.ToInt32(InsertData["Check"].ToString())
            };

            return Submission;
        }
    }
}